package com.neusoft.neuiotms.dcom.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.bizcore.web.bean.TreeBean;
import com.neusoft.bizcore.web.dto.result.ResultListDTO;
import com.neusoft.neuiotms.dcom.service.ServiceTypeService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "服务类型管理")
@RestController
@RequestMapping(value = "/api/w/servicetypes")
public class ServiceTypeController {

    @Autowired
    private ServiceTypeService serviceTypeService;

    @ApiOperation("查询所有的服务类型")
    @GetMapping
    public ResultListDTO<TreeBean> index() {
        return ResultListDTO.success(this.serviceTypeService.index());
    }
}
